package me.seawenc.datastash.outputs;

import java.io.IOException;
import java.util.Properties;
import java.util.function.Consumer;

public abstract class AbstractConsumer implements Consumer<String> {
    protected final Properties props;
    public AbstractConsumer(Properties props){
        this.props=props;
    }

    @Override
    public void accept(String msg) {
        try {
            consumption(msg);
        } catch (Exception e) {
            e.printStackTrace();
        }
    }

    protected abstract void consumption(String msg) throws Exception;

}
